import drivers.driver
from database.mydatabase import SqliteDataBase
from spider.platform.imooc import IMOOC
from models import book

# book_name = input("请输入书名：")
# book_info = douban.get_book(book_name)
# database = SqliteDataBase()
# book_info = book.load_book_info_from_db(database, '数据科学入门')
# print(book_info.get_book_info_dict())
# print(book_info.generate_markdown_article())
# print(book_info.get_insert_book_sql())
# print(book_info.get_update_book_sql())
# database.sql_execute(book_info.get_insert_book_sql())
# database.commit()

# database.close()
#
#
# driver = drivers.driver.get_driver()
# '''数据科学入门'''
# book_info.book_name = '课程收益分成.pdf'
# book_info.categorys = 'Python'
# ctfile = CTFile(browser)
# print(ctfile.get_download_url(book_info))
# imooc = IMOOC(driver)
# imooc.sync_article(book_info)
# time.sleep(5)
# drivers.close()

